package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class IllTableDef extends TableDef {

    /**
     * 实体类。

 @author 27806
 @since 2024-07-01
     */
    public static final IllTableDef ILL = new IllTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn NAME = new QueryColumn(this, "name");

    /**
     * 0病害 1虫害 2草害
     */
    public final QueryColumn TYPE = new QueryColumn(this, "type");

    public final QueryColumn COVER = new QueryColumn(this, "cover");

    public final QueryColumn PLANT_ID = new QueryColumn(this, "plant_id");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn CREATE_USER = new QueryColumn(this, "create_user");

    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    public final QueryColumn UPDATE_USER = new QueryColumn(this, "update_user");

    public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, NAME, TYPE, COVER, PLANT_ID, CREATE_TIME, CREATE_USER, UPDATE_TIME, UPDATE_USER, DESCRIPTION};

    public IllTableDef() {
        super("rc", "ill");
    }

    private IllTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public IllTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new IllTableDef("rc", "ill", alias));
    }

}
